
#pragma once
#include "vvImage.h"
#include "PhotoProjectBackUp.h"
#include <opencv2\core\core.hpp>
#include <opencv2\imgproc\imgproc.hpp>
#include <opencv2\highgui\highgui.hpp>
#include <iostream>

using namespace cv;
using namespace std;

class CPhotoProject
{
private:
	char* m_fileName;
	CPhotoProjectBackUp m_backUp;
	CvvImage m_previousImage;
	CvvImage m_image;
	bool m_previousEditState;
	bool m_isEdited;
	bool m_throw;
	void Edited();
public:

	CPhotoProject(void);
	void Open(char* fileName);
	void Save(char* fileName);
	void Save();
	void Undo();
	void CreateBackup();
	void RetoreBackup(bool full);
	void BeginComplex();
	void EndComplex();
	int GetHeight();
	int GetWidth();
	char* GetFileName(){return m_fileName;};
	void DrawImage(CStatic &pC,bool fitScreen);
	void Resize(int w,int h);
	void Flip(int axis);
	void Transpose();
	void Blur(int n);
	void MedianFilter(int n);
	void EdgeDetect(int threshold);
	void AdjustBrightness(int b);
	void AdjustContrast(double c,double shift);
	void Grayscale();
	void Invert();
	void Eroding();
	void Dilating();
	bool IsEdited(){return m_isEdited;};
	~CPhotoProject(void);
};

